/**
 * 
 */
package br.com.cocodonto.modelo.entidade;

/**
 * @author PCZERO
 *
 */
public class Dentista {
	
	private int id;
	private String cro;
	private String nome;
	private String cpf;
	private String rc;
	
	private Endereco endereco;
	private Contacto contacto;
	

	public Dentista(int id, String cro, String nome, String cpf, String rc) {
		this(cro, nome, cpf, rc);
		this.id = id;
		}
	
	public Dentista(String cro, String nome, String cpf, String rc) {
		
		this();
		this.cro = cro;
		this.nome = nome;
		this.cpf = cpf;
		this.rc = rc;
	}

	public Dentista() {
		super();
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getCro() {
		return cro;
	}

	public void setCro(String cro) {
		this.cro = cro;
	}

	public String getNome() {
		return nome;
	}

	public void setNome(String nome) {
		this.nome = nome;
	}

	public String getCpf() {
		return cpf;
	}

	public void setCpf(String cpf) {
		this.cpf = cpf;
	}

	public String getRc() {
		return rc;
	}

	public void setRc(String rc) {
		this.rc = rc;
	}

	public Endereco getEndereco() {
		return endereco;
	}

	public void setEndereco(Endereco endereco) {
		this.endereco = endereco;
	}

	public Contacto getContacto() {
		return contacto;
	}

	public void setContacto(Contacto contacto) {
		this.contacto = contacto;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((cpf == null) ? 0 : cpf.hashCode());
		result = prime * result + ((cro == null) ? 0 : cro.hashCode());
		result = prime * result + id;
		result = prime * result + ((nome == null) ? 0 : nome.hashCode());
		result = prime * result + ((rc == null) ? 0 : rc.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Dentista other = (Dentista) obj;
		if (cpf == null) {
			if (other.cpf != null)
				return false;
		} else if (!cpf.equals(other.cpf))
			return false;
		if (cro == null) {
			if (other.cro != null)
				return false;
		} else if (!cro.equals(other.cro))
			return false;
		if (id != other.id)
			return false;
		if (nome == null) {
			if (other.nome != null)
				return false;
		} else if (!nome.equals(other.nome))
			return false;
		if (rc == null) {
			if (other.rc != null)
				return false;
		} else if (!rc.equals(other.rc))
			return false;
		return true;
	}

	@Override
	public String toString() {
		StringBuilder builder = new StringBuilder();
		builder.append("Dentista [id=").append(id).append(", cro=").append(cro)
				.append(", nome=").append(nome).append(", cpf=").append(cpf)
				.append(", rc=").append(rc).append(", endereco=")
				.append(endereco).append(", contacto=").append(contacto)
				.append("]");
		return builder.toString();
	}

	

}
